def gpio(pin, mode='r', value=0,default=-1):
    pmap = {
        b'LED' : 4,
    }
    if isinstance(pin,str):
        pin = pin.upper()
        thepin  = pmap.get( bytes(pin,'utf-8'), default)
    else:
        thepin = int(pin)

    if not thepin in use.GPIO:
        import machine
        if 'w' in mode:
            instance = machine.Pin(thepin,mode=machine.Pin.OUT,value=value)
            if 's' in mode:
                pdb('211:servo')
            if 'p' in mode:
                pdb('213:pwm')
        elif 'r' in mode:
            instance = machine.Pin(thepin,mode=machine.Pin.IN)
        else:
            pdb('27: miss pin (%S)%s mode' % (thepin, pin) )
            raise ValueError("invalid pin mode r/w != '%s'" % mode)
        use.GPIO[thepin] = instance

    return use.GPIO.get(thepin)


